package com.xywh.dakaqiandao.di.module;

import com.jess.arms.di.scope.ActivityScope;

import dagger.Module;
import dagger.Provides;

import com.xywh.dakaqiandao.mvp.contract.XieYiContract;
import com.xywh.dakaqiandao.mvp.model.XieYiModel;


@Module
public class XieYiModule {
    private XieYiContract.View view;

    /**
     * 构建XieYiModule时,将View的实现类传进来,这样就可以提供View的实现类给presenter
     *
     * @param view
     */
    public XieYiModule(XieYiContract.View view) {
        this.view = view;
    }

    @ActivityScope
    @Provides
    XieYiContract.View provideXieYiView() {
        return this.view;
    }

    @ActivityScope
    @Provides
    XieYiContract.Model provideXieYiModel(XieYiModel model) {
        return model;
    }
}